package com.blog.service.impl;

import com.blog.dao.CommentDao;
import com.blog.dao.impl.CommentDaoImpl;
import com.blog.pojo.Comment;
import com.blog.service.CommentService;

import java.util.List;

public class CommentServiceImpl implements CommentService {

    CommentDao commentDao=new CommentDaoImpl();

    @Override
    public List<Comment> findCommentsByArticleId(int article_id) {
        return commentDao.findCommentsByArticleId(article_id);
    }

    @Override
    public int add(Comment comment) {
        return commentDao.add(comment);
    }

    @Override
    public int deleteById(String commentId) {
        return commentDao.deleteById(commentId);
    }

    @Override
    public int starById(String commentId) {
        return commentDao.starById(commentId);
    }

    @Override
    public int dissById(String commentId) {
        return commentDao.dissById(commentId);
    }
}
